import Vue from 'vue'
import VueRouter from 'vue-router'
import About from '@/pages/About'
import Home from '@/pages/Home'
import News from '@/pages/News'
import Message from '@/pages/Message'
import Detail from '@/pages/Detail'

Vue.use(VueRouter)

export default new VueRouter({
  mode:'history',
  routes:[
    {
      name:'guanyu',
      path:'/about',
      component:About
    },
    {
      name:'zhuye',
      path:'/home',
      component:Home,
      children:[
        {
          name:'xinwen',
          path:'news',
          component:News
        },
        {
          name:'xiaoxi',
          path:'message',
          component:Message,
          children:[
            {
              name:'xiangqing',
              path:'detail',
              component:Detail
            }
          ]
        }
      ]
    },
  ]
})